<?php
include_once '../data/database_dal.php';

class ToolmakingDAL extends DatabaseDAL
{
    function update($id, $rfqID, $quote, $attached, $advise, $cavities, $steel, $preferred, $other, $information, $inTime, $inUser)
    {
        echo $id;
        $this->connect();
        $result = $this->mysqli->query("call pr_toolmaking_update('". $id ."', '". $rfqID ."', '". $quote ."', '". $attached ."', '". $advise ."', '". $cavities ."', '". $steel ."',
                                                        '". $prefened ."', '". $other ."', '". $information ."', '". $inTime ."', '". $inUser ."')");
        $this->close();
        return $result;
    }

    function get($where)
    {
        $this->connect();
        return $this->mysqli->query("call pr_user_get(".'"'.$where.'"'.")");
        $this->close();
        return $result; 
    }

    function getAll($orderBy)
    {
        $this->connect();
        return $this->mysqli->query("call pr_user_get(".'"'.$orderBy.'"'.")");
        $this->close();
        return $result;  
    }

    function delete($id)
    {
        $this->connect();
        $result = $this->mysqli->query("call pr_toolmaking_delete('". $id ."')");
        $this->close();
        return $result;
    }
}

?>
